home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tex / macros / contrib / eqnarray.sty (.txt) < prev    next >
Encoding:
LaTeX Document  |  1995-03-15  |  4.8 KB  |  121 lines

  1. %% This is file `eqnarray.sty', generated 
  2. %% on <1995/3/4> with the docstrip utility (2.2i).
  3. %% The original source files were:
  4. %% eqnarray.dtx  (with options: `package')
  5. %% Copyright (C) 1994 Nederlandstalige TeX Gebruikersgroep. 
  6. %% All rights reserved. 
  7. %% For additional copyright information see further down in this file. 
  8. %% This file is part of the NTG document classes distribution 
  9. %% ---------------------------------------------------------- 
  10. %% This file is distributed in the hope that it will be useful, 
  11. %% but WITHOUT ANY WARRANTY; without even the implied warranty of 
  12. %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
  13. %% IMPORTANT NOTICE: 
  14. %% For error reports in case of UNCHANGED versions see readme file. 
  15. %% Please do not request updates from us directly. Distribution is 
  16. %% done through Mail-Servers and TeX organizations. 
  17. %% You are not allowed to change this file. 
  18. %% You are allowed to distribute this file under the condition that 
  19. %% it is distributed together with all files mentioned in 00readme.txt. 
  20. %% If you receive only some of these files from someone, complain! 
  21. %% You are NOT ALLOWED to distribute this file alone. You are NOT 
  22. %% ALLOWED to take money for the distribution or use of either this 
  23. %% file or a changed version, except for a nominal charge for copying 
  24. %% etc. 
  25. \def\fileversion{1.1}
  26. \def\filedate{jan 1993}
  27. \def\docdate{9 jan 1995}
  28. \typeout{equationarray \fileversion\space<\filedate>}
  29. \typeout{English documentation\space\space<\docdate>}
  30. \def\equationarray{%
  31.  \col@sep\arraycolsep
  32.  \def\d@llarbegin{$\displaystyle}%
  33.  \def\d@llarend{$}%
  34.  \stepcounter{equation}%
  35.  \let\@currentlabel=\theequation
  36.  \set@eqnsw \global\@eqcnt\z@ \global\@eqargcnt\z@
  37.  \let\@classz\@eqnclassz
  38.  \def\multicolumn##1##2##3{\@eqnmulticolumn{##1}{##2}{##3}%
  39.                            \global\advance\@eqcnt##1
  40.                            \global\advance\@eqcnt\m@ne}%
  41.  \def\@halignto{to\displaywidth}%
  42.  \@ifnextchar[{\@equationarray}{\@equationarray[c]}}
  43. \let\@eqnmulticolumn=\multicolumn
  44. \def\yesnumber{\global\@eqnswtrue}
  45. \let\set@eqnsw=\yesnumber
  46. \def\@amper{&}
  47. \newcount\@eqargcnt  % counts number of columns
  48. \def\@equationarray[#1]#2{%
  49.      \@tempdima \ht \strutbox
  50.      \advance \@tempdima by\extrarowheight
  51.      \setbox\@arstrutbox=\hbox{\vrule
  52.                \@height\arraystretch \@tempdima
  53.                \@depth\arraystretch \dp \strutbox
  54.                \@width\z@}%
  55.      \gdef\advance@eqargcnt{\global\advance\@eqargcnt\@ne}%
  56.      \begingroup
  57.      \@mkpream{#2}%
  58.      \xdef\@preamble{%
  59.       \if #1l\tabskip\z@ \else\if #1r\tabskip\@centering
  60.                          \else\tabskip\@centering \fi\fi
  61.       \halign \@halignto
  62.       \bgroup \tabskip\z@ \@arstrut \@preamble
  63.       \if #1l\tabskip\@centering \else\if #1r\tabskip\z@
  64.                                  \else\tabskip\@centering \fi\fi
  65.       \@amper\llap{\@sharp}\tabskip\z@\cr}%
  66.      \endgroup
  67.      \gdef\advance@eqargcnt{}%
  68.      \bgroup
  69.      \let\@sharp## \let\protect\relax
  70.      \m@th   \let\\=\@equationcr
  71.      \let\par\@empty
  72.      $$                            % $$ BRACE MATCHING HACK
  73.      \lineskip \z@
  74.      \baselineskip \z@
  75.      \@preamble}
  76. \def\@eqnclassz{\@classx
  77.    \@tempcnta \count@
  78.    \advance@eqargcnt
  79.    \prepnext@tok
  80.    \@addtopreamble{%
  81.       \global\advance\@eqcnt\@ne
  82.       \ifcase \@chnum
  83.       \hfil \d@llarbegin \insert@column \d@llarend\hfil \or
  84.       \d@llarbegin \insert@column \d@llarend \hfil \or
  85.       \hfil\kern\z@ \d@llarbegin \insert@column \d@llarend \or
  86.       $\vcenter
  87.       \@startpbox{\@nextchar}\insert@column \@endpbox $\or
  88.       \vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or
  89.       \vbox \@startpbox{\@nextchar}\insert@column \@endpbox
  90.       \fi}\prepnext@tok}
  91. \def\endequationarray{\@zequationcr
  92.    \egroup
  93.    \global\advance\c@equation\m@ne $$  % $$ BRACE MATCHING HACK
  94.    \egroup\global\@ignoretrue
  95.    \gdef\@preamble{}}
  96. \def\@equationcr{${\ifnum0=`}\fi\@ifstar{\global\@eqpen\@M
  97.     \@xequationcr}{\global\@eqpen\interdisplaylinepenalty
  98.                    \@xequationcr}}
  99. \def\@xequationcr{%
  100.     \@ifnextchar[{\@argequationcr}{\ifnum0=`{\fi}${}%
  101.     \@zequationcr}}
  102. \def\@argequationcr[#1]{\ifnum0=`{\fi}${}\ifdim #1>\z@
  103.    \@xargequationcr{#1}\else
  104.    \@yargequationcr{#1}\fi}
  105. \def\@xargequationcr#1{\unskip
  106.    \@tempdima #1\advance\@tempdima \dp \@arstrutbox
  107.    \vrule \@depth\@tempdima \@width\z@
  108.    \@zequationcr\noalign{\penalty\@eqpen}}
  109. \def\@yargequationcr#1{%
  110.    \@zequationcr\noalign{\penalty\@eqpen\vskip #1}}
  111. \def\@zequationcr{\@whilenum\@eqcnt <\@eqargcnt
  112.    \do{\@amper\omit\global\advance\@eqcnt\@ne}%
  113.    \@amper
  114.    \if@eqnsw\@eqnnum\stepcounter{equation}\fi
  115.    \set@eqnsw\global\@eqcnt\z@\cr}
  116. \@namedef{equationarray*}{%
  117.    \let\set@eqnsw=\nonumber \equationarray}
  118. \@namedef{endequationarray*}{\endequationarray}
  119. \endinput
  120. %% End of file `eqnarray.sty'.
  121.